FROM node:14-alpine
WORKDIR /app
COPY . .
RUN yarn config set registry https://registry.npmmirror.com
RUN yarn config set puppeteer_download_host https://npm.taobao.org/mirrors/
RUN yarn
RUN yarn build

FROM nginx
WORKDIR /usr/share/nginx/html/
COPY --from=0 /app/build/  .
